package com.hjm.common.api.ls.leshua;


import com.alibaba.fastjson.JSONObject;
import com.hjm.common.api.ls.leshua.entity.TermDto;
import com.hjm.common.utils.LogUtils;
import com.hjm.framework.web.domain.AjaxResult;

import java.util.Map;


public class LSClient {
    private String agentId="1099500";
    private String source="pb_externel_kuaishuafu";
    private String baseUrl="http://111.202.198.242:8668/external-api/";

   public static void main(String[] args) {
       try {
           LSClient testLSCkient = new LSClient();
           testLSCkient.terminalInto("123213213123123123",null);//终端入库
       } catch (Exception e) {

           throw new RuntimeException(e);
       }
   }

    /**
     * @param sn   机器号
     * @param model 型号
     */
    public AjaxResult terminalInto(String sn,String model) {
        TermDto termDto = new TermDto();
        termDto.setAgentId("6871328");//8972118->6871328
        termDto.setSource("pb_externel_kuaishuafu");
        termDto.setTusnList(sn);
      //  termDto.setDeviceModel("YZ61Mp");
        termDto.setDeviceModel(model);

        LogUtils.logInfo("请求乐刷报文:" + JSONObject.toJSONString(termDto));
        //  AjaxResult ajaxResult = LeShuaUtil.commonRemote(termDto, "https://p-channel.lepass.cn/external-api/");
         AjaxResult ajaxResult = LeShuaUtil.commonRemote(termDto, "https://pb-api.leshuazf.com/external-api/merchantinfo/v3/warehousingPos");
        return ajaxResult;
    }


}
